from pymongo import MongoClient

username = "admin"
password = "123456"
client = MongoClient('mongodb://120.24.87.40:27017', username = username, password = password)

myDB = client['admin']

myCollection = myDB['student']

mydict = {
    "name": "duzhuan",
    "age": "18",
    "score": "99",
}

myCollection.insert_one(mydict)

tmp = myCollection.find()
for i in tmp:
    print(i)
